<template>
  <div id="page">
    <div v-show="pageData.length>0" class="recordList">
      <div class="goods_name twoLine">
        冬天加厚羊羔绒冬被 双人被子 学生儿童保暖被芯太空被褥"发胜多负少东方闪电发的是
      </div>
      <div class="flex-row firstdiv">
        <div class="flex-grow-1">
          订单状态
        </div>
        <div v-show="false" class="flex-grow-1 textRight lvse">
          订单付款
        </div>
        <div v-show="true" class="flex-grow-1 textRight red">
          订单已失效
        </div>
      </div>
      <div class="flex-row secorddiv">
        <div class="flex-grow-1">
          下单时间
        </div>
        <div v-show="false" class="flex-grow-1 textRight">
          11111111
        </div>
        <div v-show="true" class="flex-grow-1 textRight red">
          ………………
        </div>
      </div>
      <div class="flex-row lastdiv">
        <div class="flex-grow-1">
          预估收益(元)
        </div>
        <div v-show="false" class="flex-grow-1 textRight">
          <span class="red money">500.00</span>
        </div>
        <div v-show="true" class="flex-grow-1 textRight red">
          ………………
        </div>
      </div>
    </div>
    <div v-show="showNoData" class="nodata">---暂无数据---</div>
  </div>
</template>
<script>
  import {GETORDERLIST} from 'src/const/uri'
  export default{

    data(){
      return {
        reqPage:1,
        reqPageSize:10,
        pageData:[],
        showNodata:false,
      }
    },
    created(){

    },
    watch:{
      pageData(val){
        if(val.length!==0){
          this.showNodata=false;
        }else{
          this.showNoData=true;
        }
      }
    },
    mounted(){
      this.initData();
      let spinner = document.getElementsByClassName('spinner')[0];
      spinner.style.display = 'none';
    },
    methods:{
      initData(){
        this.$ajax.get(GETORDERLIST,{
          reqPageSize:this.reqPageSize,
          reqPage:1,
        },(res)=>{
          console.log(res);
          this.pageData=res.data.data;

        })
      },
      refreshData(responseCallback) {
        this.initData();
        responseCallback({code: '0'});
      },
    }
  }
</script>
<style lang="less" scoped>
  @import "index";

</style>
